package com.example.tms.mapper;

import com.example.tms.bean.Peakwaybill;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

/**
 * 高峰业务
 */
@Repository
public interface PeakwaybillMapper  extends JpaSpecificationExecutor<Peakwaybill>, JpaRepository<Peakwaybill,String> {

    //删除高峰业务信息（假删除 高峰业务id）
    @Query(value = "update peak_waybill set sfcz = false where peakid = ?1", nativeQuery = true)
    @Modifying
    @Transactional
    void DeleteByPeakid(String peakid);
}
